"""
this script is to plot théorical data and experimental data
given by the arduino
"""
import numpy as np
import matplotlib.pyplot as plt
from scipy.interpolate import interp1d


# measured position and speed values during trajectory
data = np.array([
[0.00, 0, 0, 0, 0, 28, -9, 10, 0],
[0.06, 47, -32, 40, -23, 516, -402, 462, -313],
[0.12, 161, -148, 158, -127, 1215, -1133, 1182, -1019],
[0.18, 303, -282, 303, -258, 1673, -1636, 1701, -1561],
[0.24, 447, -425, 444, -400, 1945, -1910, 1980, -1860],
[0.30, 583, -561, 591, -533, 2094, -2074, 2132, -2027],
[0.36, 727, -705, 737, -674, 2131, -2128, 2190, -2092],
[0.42, 814, -793, 831, -768, 1720, -1655, 1728, -1650],
[0.49, 891, -861, 895, -830, 1593, -1535, 1527, -1463],
[0.55, 1010, -980, 1015, -941, 1826, -1719, 1777, -1679],
[0.61, 1161, -1106, 1160, -1077, 2040, -1850, 2017, -1850],
[0.67, 1302, -1234, 1313, -1211, 2181, -1943, 2137, -1986],
[0.73, 1452, -1368, 1448, -1340, 2274, -2018, 2193, -2059],
[0.80, 1604, -1500, 1599, -1482, 2340, -2049, 2231, -2093],
[0.86, 1758, -1629, 1737, -1610, 2374, -2018, 2257, -2111],
[0.92, 1913, -1741, 1884, -1745, 2407, -1958, 2285, -2123],
[0.98, 2060, -1858, 2030, -1880, 2442, -1915, 2301, -2129],
[1.04, 2218, -1982, 2179, -2016, 2468, -1915, 2322, -2130],
[1.10, 2378, -2099, 2328, -2151, 2495, -1892, 2335, -2130],
[1.17, 2539, -2211, 2475, -2278, 2518, -1880, 2329, -2130],
[1.23, 2700, -2326, 2620, -2421, 2529, -1824, 2303, -2132],
[1.29, 2854, -2431, 2762, -2549, 2550, -1731, 2268, -2132],
[1.35, 3019, -2530, 2904, -2683, 2580, -1663, 2262, -2125],
[1.41, 3186, -2630, 3044, -2818, 2614, -1617, 2241, -2128],
[1.47, 3355, -2722, 3185, -2953, 2640, -1578, 2235, -2129],
[1.53, 3517, -2821, 3317, -3084, 2667, -1589, 2218, -2102],
[1.60, 3689, -2919, 3457, -3219, 2697, -1517, 2206, -2134],
[1.66, 3863, -2999, 3594, -3360, 2721, -1400, 2187, -2169],
[1.72, 4039, -3076, 3732, -3501, 2749, -1307, 2184, -2193],
[1.78, 4216, -3151, 3871, -3642, 2770, -1259, 2178, -2214],
[1.85, 4394, -3226, 4011, -3784, 2795, -1226, 2151, -2226],
[1.91, 4574, -3302, 4146, -3928, 2824, -1214, 2137, -2248],
[1.97, 4746, -3367, 4283, -4072, 2842, -1098, 2154, -2260],
[2.03, 4928, -3417, 4411, -4210, 2866, -948, 2115, -2287],
[2.09, 5113, -3464, 4533, -4358, 2897, -854, 2023, -2318],
[2.15, 5301, -3510, 4664, -4516, 2933, -796, 2008, -2343],
[2.22, 5490, -3556, 4791, -4660, 2956, -770, 2007, -2370],
[2.28, 5681, -3596, 4918, -4813, 2984, -672, 2006, -2400],
[2.34, 5872, -3619, 5042, -4969, 2999, -497, 1960, -2430],
[2.40, 6065, -3630, 5154, -5126, 3027, -331, 1856, -2452],
[2.46, 6260, -3630, 5261, -5285, 3050, -181, 1788, -2485],
[2.53, 6446, -3632, 5369, -5446, 3078, -148, 1751, -2510],
[2.59, 6643, -3650, 5481, -5608, 3093, -189, 1758, -2539],
[2.65, 6842, -3651, 5590, -5772, 3109, -99, 1720, -2559],
[2.71, 7041, -3650, 5688, -5938, 3131, -39, 1632, -2605],
[2.77, 7241, -3648, 5781, -6108, 3145, -5, 1560, -2640],
[2.84, 7440, -3630, 5873, -6280, 3144, 176, 1503, -2673],
[2.90, 7631, -3599, 5960, -6454, 3165, 324, 1488, -2723],
[2.96, 7834, -3567, 6053, -6631, 3188, 424, 1454, -2748],
[3.02, 8037, -3527, 6135, -6808, 3189, 532, 1373, -2776],
[3.08, 8240, -3480, 6210, -6978, 3195, 637, 1263, -2806],
[3.14, 8442, -3428, 6279, -7161, 3191, 740, 1186, -2843],
[3.21, 8633, -3369, 6347, -7346, 3180, 858, 1145, -2887],
[3.27, 8835, -3301, 6419, -7535, 3191, 963, 1140, -2938],
[3.33, 9035, -3227, 6489, -7726, 3176, 1090, 1089, -2974],
[3.39, 9235, -3143, 6545, -7918, 3168, 1206, 970, -3000],
[3.45, 9435, -3056, 6593, -8110, 3160, 1285, 880, -3023],
[3.52, 9634, -2962, 6645, -8315, 3146, 1404, 832, -3047],
[3.58, 9832, -2859, 6694, -8500, 3132, 1506, 805, -3069],
[3.64, 10027, -2754, 6742, -8697, 3099, 1583, 782, -3097],
[3.70, 10218, -2642, 6787, -8897, 3050, 1684, 731, -3118],
[3.77, 10403, -2521, 6822, -9096, 2981, 1788, 634, -3137],
[3.83, 10576, -2398, 6852, -9297, 2947, 1873, 560, -3157],
[3.89, 10764, -2278, 6881, -9499, 2963, 1944, 536, -3166],
[3.95, 10951, -2136, 6914, -9702, 2942, 2038, 506, -3194],
[4.01, 11131, -1995, 6939, -9907, 2881, 2139, 428, -3213],
[4.08, 11308, -1851, 6953, -10111, 2832, 2202, 316, -3217],
[4.14, 11481, -1701, 6963, -10328, 2803, 2288, 244, -3232],
[4.20, 11657, -1544, 6974, -10533, 2794, 2391, 201, -3233],
[4.26, 11832, -1391, 6976, -10740, 2755, 2468, 115, -3246],
[4.33, 11995, -1217, 6975, -10943, 2638, 2539, 48, -3218],
[4.39, 12147, -1054, 6969, -11144, 2544, 2642, -15, -3206],
[4.45, 12304, -874, 6966, -11336, 2505, 2732, -50, -3198],
[4.51, 12456, -691, 6947, -11534, 2449, 2813, -195, -3142],
[4.57, 12599, -502, 6917, -11733, 2315, 2908, -322, -3051],
[4.63, 12721, -305, 6879, -11910, 2121, 3008, -465, -2930],
[4.70, 12837, -104, 6830, -12088, 1999, 3083, -621, -2884],
[4.76, 12954, 99, 6770, -12268, 1901, 3152, -799, -2835],
[4.82, 13050, 307, 6699, -12423, 1691, 3217, -970, -2647],
[4.88, 13128, 517, 6613, -12579, 1497, 3269, -1164, -2548],
[4.95, 13205, 728, 6515, -12724, 1367, 3298, -1364, -2430],
[5.01, 13273, 929, 6406, -12857, 1189, 3313, -1544, -2260],
[5.07, 13318, 1149, 6286, -12969, 925, 3298, -1731, -1969],
[5.13, 13352, 1355, 6153, -13063, 716, 3277, -1866, -1716],
[5.20, 13380, 1559, 6016, -13146, 605, 3250, -2019, -1550],
[5.26, 13407, 1760, 5873, -13233, 487, 3216, -2135, -1453],
[5.32, 13416, 1960, 5723, -13301, 312, 3175, -2249, -1210],
[5.38, 13416, 2147, 5576, -13342, 171, 3139, -2354, -949],
[5.44, 13416, 2338, 5416, -13382, 93, 3081, -2441, -796],
[5.50, 13416, 2525, 5254, -13415, 51, 3015, -2503, -675],
[5.57, 13416, 2708, 5086, -13445, 28, 2959, -2572, -555],
[5.63, 13416, 2890, 4915, -13450, 15, 2914, -2637, -309],
[5.69, 13415, 3070, 4733, -13450, -6, 2883, -2687, -169],
[5.75, 13414, 3248, 4557, -13450, -4, 2842, -2737, -93],
[5.81, 13409, 3412, 4379, -13449, -57, 2775, -2764, -36],
[5.88, 13389, 3590, 4200, -13447, -188, 2726, -2798, -12],
[5.94, 13364, 3756, 4018, -13445, -305, 2670, -2832, 27],
[6.00, 13336, 3910, 3835, -13427, -362, 2623, -2875, 193],
[6.06, 13308, 4072, 3646, -13395, -398, 2580, -2926, 320],
[6.13, 13279, 4229, 3454, -13363, -433, 2528, -2974, 421],
[6.19, 13247, 4381, 3259, -13324, -490, 2468, -3028, 541],
[6.25, 13210, 4530, 3062, -13274, -525, 2410, -3073, 640],
[6.31, 13174, 4677, 2864, -13221, -562, 2370, -3099, 746],
[6.37, 13133, 4823, 2665, -13159, -592, 2339, -3119, 860],
[6.43, 13092, 4960, 2465, -13095, -626, 2310, -3137, 965],
[6.50, 13047, 5104, 2264, -13016, -673, 2286, -3159, 1089],
[6.56, 13000, 5253, 2051, -12932, -702, 2265, -3174, 1203],
[6.62, 12953, 5395, 1848, -12844, -717, 2255, -3196, 1312],
[6.69, 12906, 5534, 1643, -12747, -736, 2219, -3218, 1421],
[6.75, 12851, 5670, 1426, -12639, -782, 2183, -3224, 1521],
[6.81, 12797, 5805, 1220, -12531, -823, 2151, -3244, 1614],
[6.87, 12740, 5945, 1014, -12417, -858, 2128, -3249, 1717],
[6.94, 12682, 6077, 796, -12290, -893, 2107, -3265, 1812],
[7.00, 12621, 6209, 587, -12166, -925, 2089, -3272, 1887],
[7.06, 12556, 6345, 367, -12031, -947, 2064, -3290, 1962],
[7.13, 12493, 6473, 159, -11896, -966, 2044, -3297, 2048],
[7.19, 12430, 6601, -52, -11758, -986, 2027, -3306, 2125],
[7.25, 12361, 6727, -272, -11608, -1009, 2009, -3312, 2179],
[7.32, 12294, 6852, -483, -11463, -1029, 1985, -3315, 2229],
[7.38, 12226, 6982, -705, -11315, -1053, 1972, -3321, 2305],
[7.44, 12156, 7105, -916, -11160, -1083, 1958, -3324, 2372],
[7.51, 12081, 7227, -1127, -11003, -1136, 1927, -3326, 2428],
[7.57, 12004, 7343, -1337, -10834, -1181, 1889, -3327, 2488],
[7.63, 11924, 7457, -1549, -10670, -1227, 1834, -3345, 2528],
[7.69, 11840, 7567, -1762, -10502, -1272, 1779, -3346, 2600],
[7.76, 11754, 7672, -1973, -10329, -1320, 1723, -3331, 2669],
[7.82, 11665, 7775, -2194, -10152, -1367, 1679, -3324, 2726],
[7.88, 11572, 7875, -2404, -9973, -1431, 1618, -3319, 2777],
[7.94, 11474, 7968, -2614, -9792, -1486, 1534, -3317, 2813],
[8.01, 11376, 8055, -2823, -9610, -1523, 1470, -3308, 2852],
[8.07, 11274, 8146, -3042, -9414, -1565, 1458, -3297, 2891],
[8.13, 11166, 8236, -3249, -9225, -1585, 1434, -3276, 2950],
[8.19, 11068, 8323, -3455, -9035, -1618, 1415, -3272, 2967],
[8.26, 10964, 8412, -3660, -8843, -1629, 1417, -3257, 2996],
[8.32, 10859, 8505, -3867, -8650, -1633, 1426, -3246, 3018],
[8.38, 10748, 8598, -4071, -8457, -1651, 1407, -3242, 3038],
[8.44, 10642, 8683, -4286, -8252, -1661, 1378, -3232, 3058],
[8.51, 10535, 8770, -4490, -8057, -1680, 1376, -3227, 3068],
[8.57, 10427, 8858, -4692, -7861, -1693, 1389, -3212, 3089],
[8.63, 10320, 8948, -4895, -7665, -1685, 1403, -3202, 3095],
[8.69, 10214, 9038, -5096, -7468, -1680, 1411, -3196, 3103],
[8.75, 10107, 9128, -5298, -7270, -1691, 1415, -3180, 3114],
[8.82, 10001, 9218, -5507, -7072, -1685, 1410, -3155, 3126],
[8.88, 9894, 9307, -5705, -6862, -1683, 1416, -3144, 3125],
[8.95, 9783, 9402, -5912, -6663, -1680, 1426, -3121, 3140],
[9.01, 9677, 9494, -6103, -6464, -1669, 1440, -3071, 3145],
[9.07, 9572, 9586, -6296, -6253, -1662, 1447, -3033, 3151],
[9.13, 9467, 9679, -6478, -6053, -1660, 1457, -2962, 3163],
[9.20, 9363, 9772, -6678, -5852, -1655, 1465, -2995, 3165],
[9.26, 9253, 9871, -6881, -5640, -1648, 1466, -3016, 3169],
[9.33, 9149, 9963, -7070, -5428, -1642, 1461, -3003, 3182],
[9.39, 9041, 10062, -7272, -5225, -1628, 1479, -3016, 3185],
[9.45, 8939, 10158, -7465, -5023, -1618, 1496, -3036, 3194],
[9.51, 8838, 10254, -7656, -4819, -1606, 1503, -3028, 3207],
[9.58, 8738, 10351, -7848, -4616, -1593, 1524, -3012, 3209],
[9.64, 8638, 10449, -8045, -4400, -1586, 1535, -2984, 3222],
[9.70, 8534, 10553, -8246, -4196, -1568, 1540, -2995, 3217],
[9.77, 8436, 10652, -8432, -3992, -1558, 1548, -2976, 3225],
[9.83, 8339, 10751, -8620, -3787, -1552, 1562, -2975, 3229],
[9.89, 8242, 10851, -8809, -3581, -1544, 1571, -2979, 3240],
[9.95, 8145, 10951, -8998, -3365, -1530, 1583, -2972, 3238],
[10.02, 8049, 11053, -9180, -3159, -1525, 1589, -2913, 3244],
[10.08, 7954, 11154, -9370, -2953, -1513, 1598, -2896, 3247],
[10.14, 7855, 11262, -9554, -2736, -1501, 1604, -2886, 3256],
[10.21, 7761, 11364, -9743, -2528, -1496, 1607, -2857, 3260],
[10.27, 7669, 11466, -9921, -2310, -1478, 1612, -2848, 3271],
[10.33, 7571, 11574, -10112, -2101, -1475, 1618, -2845, 3276],
[10.40, 7478, 11676, -10288, -1894, -1465, 1616, -2829, 3280],
[10.46, 7387, 11779, -10479, -1674, -1462, 1627, -2833, 3289],
[10.52, 7290, 11888, -10656, -1454, -1442, 1627, -2820, 3285],
[10.59, 7200, 11990, -10844, -1245, -1437, 1612, -2805, 3298],
[10.65, 7109, 12093, -11016, -1037, -1438, 1630, -2763, 3293],
[10.71, 7014, 12202, -11199, -817, -1422, 1620, -2762, 3296],
[10.78, 6925, 12300, -11369, -608, -1420, 1590, -2721, 3306],
[10.84, 6835, 12402, -11541, -397, -1422, 1605, -2719, 3319],
[10.90, 6741, 12511, -11722, -175, -1415, 1621, -2696, 3318],
[10.97, 6652, 12615, -11890, 46, -1404, 1628, -2617, 3325],
[11.03, 6559, 12725, -12062, 257, -1404, 1633, -2611, 3328],
[11.10, 6470, 12829, -12228, 468, -1396, 1644, -2624, 3330],
[11.16, 6382, 12933, -12395, 680, -1391, 1644, -2623, 3330],
[11.22, 6294, 13038, -12559, 902, -1389, 1652, -2594, 3337],
[11.29, 6202, 13147, -12727, 1125, -1383, 1627, -2547, 3333],
[11.35, 6115, 13244, -12878, 1337, -1377, 1591, -2472, 3338],
[11.41, 6028, 13346, -13042, 1549, -1376, 1607, -2455, 3341],
[11.47, 5942, 13451, -13192, 1761, -1367, 1621, -2424, 3343],
[11.54, 5856, 13555, -13343, 1984, -1366, 1642, -2390, 3350],
[11.60, 5765, 13665, -13495, 2196, -1364, 1643, -2336, 3349],
[11.66, 5684, 13764, -13643, 2409, -1355, 1650, -2343, 3347],
[11.73, 5599, 13870, -13789, 2621, -1348, 1643, -2317, 3354],
[11.79, 5511, 13981, -13930, 2834, -1329, 1670, -2271, 3357],
[11.85, 5429, 14087, -14078, 3057, -1314, 1673, -2233, 3353],
[11.92, 5349, 14195, -14210, 3270, -1290, 1690, -2165, 3358],
[11.98, 5270, 14303, -14342, 3482, -1272, 1706, -2128, 3354],
[12.04, 5192, 14413, -14474, 3695, -1245, 1716, -2100, 3357],
[12.10, 5113, 14520, -14605, 3907, -1253, 1696, -2010, 3353],
[12.16, 5030, 14623, -14714, 4119, -1296, 1650, -1863, 3351],
[12.23, 4939, 14715, -14814, 4341, -1394, 1507, -1697, 3333],
[12.29, 4824, 14786, -14895, 4547, -1576, 1269, -1416, 3281],
[12.35, 4694, 14824, -14932, 4743, -1836, 871, -963, 3164],
[12.42, 4541, 14825, -14936, 4926, -2160, 450, -516, 2925],
[12.48, 4355, 14812, -14932, 5077, -2489, 123, -235, 2629],
[12.54, 4161, 14779, -14900, 5209, -2767, -212, 190, 2278],
[12.61, 3960, 14725, -14837, 5315, -2951, -539, 611, 1988],
[12.67, 3755, 14654, -14746, 5414, -3097, -830, 998, 1796],
[12.73, 3544, 14569, -14640, 5511, -3203, -1070, 1320, 1641],
[12.79, 3333, 14482, -14525, 5589, -3268, -1218, 1561, 1447],
[12.86, 3121, 14386, -14401, 5665, -3297, -1371, 1767, 1331],
[12.92, 2898, 14279, -14263, 5743, -3328, -1491, 1922, 1260],
[12.98, 2685, 14174, -14123, 5819, -3336, -1576, 2070, 1224],
[13.05, 2473, 14066, -13970, 5889, -3340, -1637, 2179, 1163],
[13.11, 2262, 13955, -13822, 5962, -3343, -1699, 2261, 1136],
[13.17, 2039, 13835, -13659, 6030, -3337, -1746, 2356, 1103],
[13.24, 1829, 13719, -13500, 6100, -3327, -1793, 2426, 1077],
[13.30, 1618, 13601, -13339, 6167, -3327, -1826, 2491, 1068],
[13.36, 1407, 13482, -13167, 6235, -3336, -1850, 2537, 1074],
[13.43, 1185, 13356, -13001, 6305, -3328, -1871, 2581, 1060],
[13.49, 975, 13235, -12823, 6372, -3313, -1894, 2629, 1056],
[13.55, 755, 13108, -12651, 6440, -3303, -1904, 2671, 1044],
[13.62, 549, 12986, -12469, 6505, -3287, -1915, 2705, 1041],
[13.68, 340, 12863, -12293, 6575, -3284, -1925, 2739, 1041],
[13.74, 122, 12734, -12106, 6641, -3285, -1932, 2771, 1042],
[13.81, -86, 12611, -11927, 6707, -3277, -1937, 2809, 1039],
[13.87, -290, 12487, -11737, 6777, -3249, -1938, 2825, 1047],
[13.93, -495, 12364, -11557, 6843, -3244, -1947, 2833, 1045],
[14.00, -699, 12241, -11376, 6909, -3234, -1944, 2854, 1052],
[14.06, -902, 12118, -11192, 6977, -3205, -1947, 2874, 1051],
[14.12, -1112, 11987, -10998, 7048, -3174, -1951, 2894, 1060],
[14.19, -1309, 11863, -10812, 7116, -3155, -1955, 2912, 1066],
[14.25, -1508, 11740, -10615, 7184, -3149, -1954, 2932, 1072],
[14.31, -1709, 11609, -10427, 7254, -3164, -1956, 2955, 1068],
[14.37, -1920, 11485, -10227, 7321, -3159, -1953, 2977, 1060],
[14.44, -2118, 11355, -10037, 7394, -3140, -1947, 2988, 1083],
[14.50, -2327, 11233, -9837, 7465, -3139, -1944, 3003, 1101],
[14.57, -2523, 11110, -9647, 7537, -3123, -1944, 3005, 1120],
[14.63, -2721, 10988, -9445, 7613, -3125, -1941, 3019, 1136],
[14.69, -2931, 10859, -9252, 7691, -3145, -1934, 3032, 1145],
[14.76, -3131, 10731, -9049, 7765, -3132, -1928, 3040, 1165],
[14.82, -3336, 10610, -8846, 7844, -3099, -1921, 3042, 1175],
[14.89, -3528, 10484, -8651, 7920, -3084, -1908, 3057, 1187],
[14.95, -3725, 10364, -8447, 8001, -3106, -1894, 3060, 1200],
[15.01, -3925, 10244, -8252, 8079, -3129, -1886, 3069, 1215],
[15.07, -4123, 10127, -8057, 8158, -3112, -1875, 3073, 1229],
[15.14, -4326, 10009, -7851, 8237, -3084, -1860, 3080, 1251],
[15.20, -4521, 9887, -7655, 8323, -3079, -1853, 3092, 1265],
[15.26, -4727, 9770, -7448, 8405, -3076, -1843, 3093, 1285],
[15.33, -4918, 9655, -7251, 8488, -3057, -1830, 3099, 1297],
[15.39, -5112, 9535, -7043, 8576, -3069, -1816, 3108, 1316],
[15.46, -5320, 9422, -6846, 8665, -3078, -1803, 3114, 1330],
[15.52, -5510, 9303, -6637, 8751, -3052, -1786, 3118, 1341],
[15.58, -5706, 9195, -6440, 8842, -3069, -1739, 3127, 1351],
[15.65, -5912, 9091, -6231, 8929, -3079, -1691, 3127, 1372],
[15.71, -6105, 8982, -6021, 9024, -3053, -1650, 3139, 1395],
[15.77, -6304, 8887, -5823, 9115, -3023, -1600, 3133, 1414],
[15.84, -6496, 8783, -5624, 9208, -3016, -1608, 3142, 1441],
[15.90, -6684, 8680, -5413, 9305, -3003, -1572, 3140, 1455],
[15.96, -6875, 8585, -5214, 9401, -3017, -1550, 3149, 1483],
[16.03, -7068, 8485, -5015, 9497, -3032, -1572, 3149, 1507],
[16.09, -7271, 8384, -4804, 9599, -3022, -1573, 3144, 1521],
[16.15, -7458, 8280, -4594, 9697, -2998, -1549, 3152, 1541],
[16.22, -7658, 8184, -4383, 9807, -2991, -1479, 3157, 1560],
[16.28, -7845, 8097, -4182, 9909, -2983, -1430, 3168, 1577],
[16.35, -8046, 8006, -3971, 10017, -2998, -1404, 3167, 1605],
[16.41, -8247, 7916, -3759, 10126, -3004, -1370, 3172, 1621],
[16.48, -8444, 7827, -3548, 10236, -2982, -1353, 3178, 1634],
[16.54, -8634, 7741, -3334, 10341, -2991, -1363, 3182, 1654],
[16.60, -8835, 7651, -3122, 10454, -3002, -1357, 3180, 1675],
[16.67, -9025, 7565, -2921, 10564, -3001, -1358, 3184, 1706],
[16.73, -9226, 7475, -2708, 10681, -3008, -1346, 3181, 1727],
[16.80, -9416, 7395, -2507, 10800, -3004, -1287, 3188, 1762],
[16.86, -9616, 7319, -2294, 10920, -3002, -1218, 3184, 1787],
[16.93, -9816, 7245, -2083, 11036, -2990, -1159, 3175, 1808],
[16.99, -10001, 7175, -1871, 11160, -2961, -1144, 3181, 1825],
[17.05, -10199, 7098, -1658, 11284, -2972, -1147, 3180, 1857],
[17.12, -10389, 7026, -1457, 11405, -2986, -1143, 3177, 1874],
[17.18, -10591, 6951, -1245, 11533, -2996, -1133, 3186, 1903],
[17.25, -10779, 6882, -1034, 11656, -2982, -1089, 3169, 1926],
[17.31, -10979, 6818, -823, 11786, -2996, -1023, 3164, 1939],
[17.38, -11178, 6763, -623, 11918, -3000, -944, 3160, 1965],
[17.44, -11367, 6706, -416, 12046, -2988, -911, 3128, 1991],
[17.50, -11557, 6648, -218, 12176, -2994, -905, 3143, 2020],
[17.57, -11757, 6590, -7, 12315, -2996, -895, 3146, 2057],
[17.63, -11945, 6537, 193, 12455, -2983, -854, 3147, 2086],
[17.69, -12143, 6489, 399, 12591, -2968, -794, 3126, 2116],
[17.76, -12331, 6445, 609, 12735, -2977, -726, 3139, 2138],
[17.82, -12531, 6404, 818, 12881, -2979, -673, 3139, 2170],
[17.89, -12718, 6366, 1017, 13022, -2974, -641, 3149, 2198],
[17.95, -12907, 6328, 1218, 13164, -2980, -623, 3154, 2219],
[18.01, -13107, 6290, 1428, 13314, -2989, -594, 3160, 2233],
[18.08, -13294, 6260, 1628, 13458, -2966, -526, 3143, 2259],
[18.14, -13480, 6232, 1833, 13612, -2953, -482, 3110, 2284],
[18.20, -13675, 6204, 2041, 13760, -2920, -456, 3114, 2310],
[18.27, -13866, 6177, 2244, 13925, -2892, -435, 3082, 2331],
[18.33, -14056, 6147, 2446, 14073, -2848, -450, 3070, 2334],
[18.40, -14223, 6115, 2645, 14225, -2751, -487, 3109, 2298],
[18.46, -14401, 6073, 2858, 14367, -2711, -565, 3159, 2268],
[18.53, -14566, 6027, 3076, 14511, -2647, -638, 3218, 2204],
[18.59, -14724, 5970, 3295, 14644, -2427, -781, 3239, 2080],
[18.65, -14831, 5898, 3497, 14756, -2055, -971, 3216, 1891],
[18.72, -14929, 5803, 3711, 14855, -1743, -1220, 3204, 1665],
[18.79, -15015, 5689, 3920, 14936, -1466, -1484, 3147, 1384],
[18.85, -15047, 5565, 4114, 14961, -907, -1735, 2984, 820],
[18.91, -15047, 5419, 4281, 14954, -481, -1969, 2742, 387],
[18.98, -15047, 5259, 4435, 14948, -263, -2200, 2587, 100],
[19.04, -15045, 5093, 4590, 14919, -98, -2408, 2468, -147],
[19.11, -15025, 4906, 4748, 14890, 124, -2609, 2400, -297],
[19.17, -14993, 4724, 4878, 14855, 309, -2737, 2190, -423],
[19.23, -14946, 4525, 4994, 14806, 512, -2869, 1958, -578],
[19.30, -14892, 4330, 5101, 14757, 699, -2973, 1791, -692],
[19.36, -14822, 4121, 5202, 14693, 885, -3057, 1706, -825],
[19.43, -14744, 3918, 5311, 14625, 1066, -3124, 1678, -952],
[19.49, -14650, 3701, 5421, 14548, 1243, -3204, 1655, -1071],
[19.56, -14548, 3490, 5525, 14464, 1398, -3256, 1591, -1167],
[19.62, -14443, 3269, 5616, 14376, 1526, -3291, 1511, -1240],
[19.68, -14329, 3047, 5711, 14292, 1634, -3302, 1486, -1286],
[19.75, -14206, 2835, 5812, 14201, 1736, -3321, 1490, -1317],
[19.81, -14084, 2612, 5908, 14109, 1838, -3332, 1467, -1347],
[19.88, -13956, 2400, 6000, 14019, 1937, -3347, 1460, -1395],
[19.94, -13822, 2188, 6094, 13924, 2036, -3347, 1478, -1443],
[20.00, -13674, 1975, 6192, 13824, 2124, -3353, 1475, -1470],
[20.07, -13532, 1751, 6282, 13728, 2187, -3367, 1437, -1489],
[20.13, -13380, 1537, 6372, 13626, 2232, -3356, 1403, -1507],
[20.19, -13231, 1315, 6467, 13529, 2289, -3351, 1414, -1518],
[20.26, -13070, 1092, 6558, 13427, 2353, -3350, 1417, -1531],
[20.32, -12915, 879, 6652, 13323, 2411, -3356, 1412, -1546],
[20.39, -12747, 655, 6747, 13224, 2465, -3360, 1422, -1554],
[20.45, -12578, 432, 6843, 13120, 2498, -3353, 1430, -1558],
[20.52, -12415, 219, 6938, 13016, 2537, -3357, 1419, -1559],
[20.58, -12243, -4, 7026, 12911, 2571, -3354, 1415, -1565],
[20.64, -12075, -216, 7122, 12811, 2604, -3353, 1425, -1577],
[20.71, -11896, -439, 7219, 12706, 2648, -3353, 1438, -1571],
[20.77, -11715, -663, 7314, 12601, 2680, -3349, 1433, -1572],
[20.84, -11541, -875, 7405, 12501, 2709, -3355, 1435, -1574],
[20.90, -11357, -1097, 7502, 12395, 2741, -3336, 1445, -1587],
[20.97, -11171, -1318, 7599, 12289, 2764, -3333, 1439, -1584],
[21.03, -10993, -1530, 7685, 12188, 2792, -3342, 1413, -1594],
[21.10, -10804, -1752, 7780, 12082, 2812, -3329, 1418, -1588],
[21.16, -10624, -1962, 7875, 11976, 2834, -3322, 1423, -1588],
[21.22, -10432, -2182, 7965, 11875, 2850, -3312, 1416, -1588],
[21.29, -10249, -2391, 8058, 11768, 2875, -3307, 1412, -1598],
[21.35, -10053, -2611, 8151, 11667, 2914, -3303, 1396, -1601],
[21.41, -9865, -2820, 8241, 11558, 2941, -3293, 1374, -1620],
[21.48, -9665, -3038, 8327, 11449, 2970, -3290, 1359, -1629],
[21.54, -9475, -3246, 8416, 11344, 2985, -3280, 1362, -1639],
[21.61, -9273, -3462, 8502, 11234, 3013, -3268, 1349, -1647],
[21.67, -9079, -3667, 8588, 11128, 3037, -3247, 1326, -1662],
[21.73, -8884, -3872, 8670, 11014, 3055, -3235, 1302, -1688],
[21.80, -8678, -4086, 8752, 10903, 3081, -3228, 1273, -1718],
[21.86, -8480, -4289, 8832, 10785, 3095, -3209, 1259, -1741],
[21.93, -8271, -4500, 8912, 10672, 3112, -3188, 1242, -1769],
[21.99, -8073, -4700, 8994, 10552, 3134, -3174, 1229, -1783],
[22.05, -7862, -4910, 9068, 10431, 3141, -3161, 1193, -1805],
[22.12, -7661, -5108, 9146, 10314, 3164, -3145, 1189, -1826],
[22.18, -7459, -5305, 9223, 10197, 3181, -3117, 1193, -1845],
[22.25, -7245, -5511, 9302, 10072, 3192, -3098, 1193, -1856],
[22.31, -7040, -5704, 9380, 9947, 3215, -3079, 1182, -1864],
[22.37, -6825, -5907, 9458, 9821, 3220, -3063, 1169, -1876],
[22.44, -6609, -6110, 9532, 9696, 3236, -3047, 1143, -1875],
[22.50, -6392, -6310, 9608, 9569, 3239, -3026, 1150, -1889],
[22.57, -6175, -6510, 9686, 9449, 3247, -3014, 1160, -1890],
[22.63, -5969, -6699, 9761, 9323, 3258, -3000, 1182, -1891],
[22.70, -5751, -6897, 9842, 9204, 3264, -2979, 1191, -1891],
[22.76, -5544, -7085, 9923, 9078, 3268, -2982, 1202, -1884],
[22.83, -5325, -7283, 10004, 8953, 3269, -2969, 1208, -1880],
[22.89, -5107, -7479, 10080, 8829, 3275, -2954, 1204, -1872],
[22.96, -4899, -7674, 10161, 8705, 3281, -2940, 1210, -1858],
[23.02, -4680, -7858, 10244, 8582, 3282, -2918, 1234, -1851],
[23.09, -4461, -8053, 10330, 8467, 3282, -2927, 1261, -1835],
[23.15, -4253, -8238, 10413, 8347, 3282, -2920, 1290, -1818],
[23.21, -4033, -8432, 10501, 8233, 3292, -2911, 1309, -1810],
[23.28, -3825, -8625, 10590, 8115, 3297, -2911, 1322, -1784],
[23.34, -3604, -8808, 10681, 7999, 3291, -2897, 1332, -1763],
[23.41, -3387, -9001, 10772, 7885, 3282, -2900, 1362, -1738],
[23.47, -3178, -9193, 10861, 7777, 3290, -2883, 1385, -1718],
[23.54, -2959, -9376, 10958, 7665, 3289, -2894, 1424, -1699],
[23.60, -2750, -9567, 11057, 7556, 3294, -2882, 1455, -1678],
[23.66, -2531, -9759, 11157, 7446, 3289, -2882, 1476, -1659],
[23.73, -2312, -9942, 11254, 7344, 3286, -2878, 1510, -1624],
[23.79, -2092, -10131, 11358, 7240, 3293, -2850, 1535, -1588],
[23.86, -1884, -10307, 11464, 7138, 3290, -2823, 1561, -1559],
[23.92, -1665, -10494, 11572, 7044, 3287, -2819, 1596, -1517],
[23.99, -1456, -10683, 11681, 6948, 3284, -2818, 1624, -1479],
[24.05, -1237, -10861, 11787, 6853, 3292, -2809, 1637, -1452],
[24.12, -1018, -11043, 11899, 6761, 3281, -2776, 1672, -1401],
[24.18, -799, -11231, 12015, 6675, 3281, -2795, 1704, -1339],
[24.25, -592, -11419, 12134, 6596, 3283, -2803, 1749, -1276],
[24.31, -373, -11597, 12255, 6520, 3285, -2813, 1780, -1237],
[24.37, -165, -11786, 12378, 6442, 3276, -2824, 1817, -1197],
[24.44, 53, -11964, 12497, 6371, 3279, -2818, 1851, -1120],
[24.50, 271, -12151, 12625, 6307, 3276, -2809, 1884, -1064],
[24.57, 489, -12337, 12755, 6243, 3273, -2798, 1908, -1016],
[24.63, 696, -12523, 12885, 6178, 3274, -2801, 1934, -992],
[24.70, 914, -12702, 13018, 6116, 3264, -2806, 1970, -961],
[24.76, 1131, -12890, 13153, 6059, 3268, -2818, 2005, -902],
[24.83, 1338, -13077, 13292, 6005, 3263, -2805, 2044, -859],
[24.89, 1555, -13262, 13432, 5951, 3259, -2792, 2071, -838],
[24.96, 1773, -13445, 13571, 5897, 3272, -2763, 2087, -825],
[25.02, 1992, -13617, 13706, 5847, 3271, -2743, 2101, -801],
[25.09, 2199, -13790, 13846, 5795, 3277, -2743, 2109, -790],
[25.15, 2418, -13970, 13986, 5741, 3281, -2706, 2097, -807],
[25.22, 2638, -14141, 14123, 5687, 3290, -2612, 2067, -840],
[25.28, 2848, -14286, 14249, 5624, 3310, -2451, 2025, -896],
[25.34, 3071, -14447, 14384, 5556, 3326, -2367, 1976, -971],
[25.41, 3294, -14579, 14503, 5482, 3336, -2161, 1825, -1060],
[25.47, 3517, -14687, 14590, 5395, 3333, -1905, 1592, -1194],
[25.54, 3728, -14793, 14672, 5301, 3330, -1755, 1420, -1359],
[25.60, 3947, -14878, 14745, 5184, 3299, -1438, 1200, -1527],
[25.67, 4161, -14925, 14791, 5065, 3255, -1088, 927, -1714],
[25.73, 4360, -14961, 14821, 4928, 3191, -826, 709, -1895],
[25.80, 4564, -14983, 14846, 4778, 3107, -531, 507, -2079],
[25.86, 4756, -14982, 14847, 4624, 2991, -276, 262, -2270],
[25.93, 4931, -14979, 14844, 4452, 2857, -115, 114, -2432],
[25.99, 5103, -14955, 14842, 4266, 2703, 150, 53, -2630],
[26.06, 5274, -14919, 14830, 4062, 2563, 353, -119, -2788],
[26.12, 5419, -14868, 14795, 3859, 2419, 566, -312, -2912],
[26.19, 5573, -14802, 14753, 3651, 2301, 807, -485, -3017],
[26.25, 5704, -14723, 14700, 3450, 2166, 1050, -639, -3094],
[26.32, 5833, -14621, 14639, 3224, 2047, 1268, -785, -3163],
[26.39, 5955, -14514, 14568, 3016, 1939, 1479, -924, -3227],
[26.45, 6069, -14392, 14488, 2784, 1807, 1677, -1078, -3270],
[26.52, 6176, -14257, 14400, 2574, 1710, 1850, -1200, -3299],
[26.58, 6271, -14117, 14310, 2350, 1599, 2042, -1332, -3328],
[26.64, 6362, -13964, 14206, 2137, 1481, 2171, -1447, -3351],
[26.71, 6447, -13801, 14096, 1913, 1402, 2317, -1544, -3349],
[26.77, 6529, -13631, 13984, 1688, 1284, 2428, -1618, -3361],
[26.84, 6598, -13468, 13866, 1465, 1167, 2511, -1711, -3352],
[26.90, 6666, -13279, 13742, 1231, 1098, 2618, -1791, -3340],
[26.97, 6731, -13102, 13614, 1020, 1020, 2709, -1851, -3334],
[27.03, 6785, -12913, 13484, 800, 921, 2762, -1898, -3319],
[27.10, 6836, -12733, 13352, 581, 871, 2810, -1936, -3302],
[27.16, 6891, -12542, 13217, 362, 842, 2846, -1986, -3295],
[27.23, 6944, -12346, 13078, 156, 820, 2897, -2041, -3270],
[27.29, 6995, -12146, 12944, -60, 814, 2945, -2084, -3254],
[27.36, 7049, -11945, 12796, -274, 811, 2977, -2101, -3235],
[27.42, 7104, -11743, 12654, -498, 795, 3008, -2107, -3218],
[27.49, 7154, -11539, 12512, -700, 795, 3025, -2126, -3209],
[27.55, 7207, -11335, 12369, -913, 803, 3049, -2129, -3204],
[27.62, 7262, -11130, 12226, -1136, 815, 3063, -2135, -3187],
[27.69, 7318, -10935, 12084, -1336, 833, 3069, -2133, -3169],
[27.75, 7377, -10729, 11944, -1546, 859, 3088, -2127, -3164],
[27.81, 7437, -10522, 11803, -1757, 878, 3090, -2117, -3166],
[27.88, 7499, -10315, 11663, -1967, 910, 3097, -2101, -3155],
[27.95, 7560, -10108, 11526, -2177, 925, 3100, -2085, -3161],
[28.01, 7624, -9912, 11395, -2387, 949, 3105, -2079, -3153],
[28.07, 7686, -9703, 11257, -2587, 969, 3120, -2068, -3152],
[28.14, 7753, -9494, 11120, -2796, 979, 3128, -2063, -3143],
[28.20, 7819, -9284, 10976, -3015, 983, 3130, -2060, -3139],
[28.27, 7883, -9075, 10837, -3220, 971, 3147, -2079, -3085],
[28.34, 7945, -8874, 10696, -3403, 934, 3149, -2095, -2996],
[28.40, 8002, -8663, 10552, -3609, 887, 3164, -2133, -2961],
[28.47, 8046, -8449, 10403, -3797, 732, 3201, -2190, -2876],
[28.53, 8068, -8232, 10249, -3960, 531, 3227, -2264, -2715],
[28.60, 8082, -8014, 10083, -4129, 366, 3247, -2388, -2631],
[28.66, 8083, -7797, 9919, -4292, 185, 3243, -2496, -2484],
[28.73, 8075, -7594, 9737, -4415, 3, 3218, -2639, -2144],
[28.79, 8038, -7384, 9544, -4524, -294, 3178, -2768, -1898],
[28.86, 7985, -7178, 9343, -4623, -554, 3125, -2908, -1657],
[28.92, 7922, -6983, 9135, -4693, -793, 3015, -3009, -1320],
[28.99, 7842, -6804, 8926, -4739, -1019, 2915, -3076, -1008],
[29.05, 7745, -6616, 8704, -4778, -1257, 2782, -3118, -802],
[29.12, 7636, -6455, 8493, -4802, -1433, 2673, -3140, -532],
[29.18, 7521, -6287, 8292, -4803, -1588, 2582, -3158, -287],
[29.25, 7396, -6129, 8082, -4803, -1731, 2473, -3156, -152],
[29.31, 7272, -5978, 7872, -4803, -1846, 2367, -3154, -83],
[29.38, 7136, -5828, 7652, -4803, -1944, 2311, -3145, -43],
[29.44, 6989, -5681, 7445, -4799, -2025, 2252, -3118, 23],
[29.51, 6854, -5538, 7240, -4793, -2082, 2185, -3096, 75],
[29.57, 6708, -5406, 7037, -4764, -2139, 2136, -3071, 273],
[29.64, 6560, -5269, 6835, -4728, -2171, 2097, -3044, 407],
[29.70, 6411, -5125, 6635, -4686, -2204, 2077, -3023, 514],
[29.77, 6262, -4996, 6435, -4642, -2227, 2059, -3003, 592],
[29.84, 6111, -4860, 6236, -4592, -2241, 2050, -2992, 667],
[29.90, 5961, -4725, 6039, -4543, -2254, 2038, -2974, 721],
[29.97, 5808, -4590, 5842, -4486, -2276, 2032, -2965, 799],
[30.03, 5662, -4455, 5646, -4424, -2293, 2029, -2953, 868],
[30.10, 5508, -4327, 5452, -4358, -2300, 2027, -2925, 935],
[30.16, 5353, -4192, 5259, -4288, -2313, 2027, -2916, 991],
[30.22, 5206, -4058, 5066, -4217, -2319, 2019, -2906, 1036],
[30.29, 5050, -3923, 4874, -4140, -2329, 2022, -2895, 1102],
[30.35, 4894, -3789, 4683, -4058, -2336, 2017, -2876, 1170],
[30.42, 4737, -3655, 4494, -3972, -2344, 2015, -2861, 1226],
[30.49, 4580, -3521, 4295, -3882, -2348, 2008, -2842, 1289],
[30.55, 4414, -3388, 4109, -3791, -2364, 2009, -2817, 1334],
[30.62, 4255, -3255, 3924, -3697, -2366, 2004, -2796, 1394],
[30.68, 4096, -3122, 3741, -3594, -2382, 2002, -2763, 1467],
[30.75, 3944, -2996, 3560, -3489, -2390, 1993, -2739, 1519],
[30.81, 3783, -2863, 3382, -3381, -2402, 1992, -2697, 1572],
[30.88, 3622, -2731, 3207, -3271, -2408, 1987, -2635, 1615],
[30.95, 3461, -2600, 3045, -3157, -2418, 1986, -2548, 1670],
[31.01, 3298, -2461, 2867, -3033, -2423, 1976, -2548, 1726],
[31.08, 3136, -2330, 2700, -2911, -2433, 1969, -2530, 1783],
[31.14, 2972, -2205, 2533, -2785, -2447, 1966, -2520, 1843],
[31.21, 2801, -2068, 2366, -2656, -2447, 1964, -2491, 1888],
[31.27, 2645, -1937, 2214, -2526, -2461, 1963, -2388, 1926],
[31.34, 2479, -1806, 2055, -2393, -2468, 1963, -2397, 1960],
[31.40, 2314, -1676, 1885, -2256, -2480, 1956, -2412, 2015],
[31.47, 2140, -1546, 1726, -2107, -2479, 1953, -2399, 2069],
[31.54, 1982, -1416, 1569, -1963, -2483, 1951, -2361, 2120],
[31.60, 1807, -1286, 1419, -1817, -2493, 1950, -2285, 2153],
[31.67, 1640, -1156, 1281, -1669, -2497, 1950, -2186, 2191],
[31.73, 1481, -1026, 1136, -1519, -2507, 1950, -2178, 2219],
[31.80, 1313, -896, 986, -1368, -2512, 1950, -2170, 2249],
[31.87, 1145, -767, 842, -1213, -2514, 1942, -2175, 2287],
[31.93, 976, -637, 697, -1056, -2523, 1944, -2141, 2328],
[32.00, 807, -513, 566, -896, -2524, 1945, -2050, 2362],
[32.06, 639, -383, 437, -735, -2530, 1942, -2011, 2395],
[32.13, 479, -253, 312, -580, -2534, 1944, -1983, 2419],
[32.19, 309, -124, 182, -415, -2538, 1946, -1974, 2454],
[32.25, 157, -9, 60, -265, -2541, 1926, -1949, 2473]])

# trajectory points exported
X1 = np.array([829.0,1720.0,2667.0,3662.0,4695.0,5758.0,6845.0,7950.0,9044.0,10090.0,11039.0,11854.0,12503.0,12978.0,13279.0,13415.0,13407.0,13299.0,13128.0,12918.0,12687.0,12452.0,12227.0,12002.0,11755.0,11426.0,10966.0,10384.0,9716.0,9036.0,8406.0,7840.0,7335.0,6871.0,6431.0,6020.0,5649.0,5342.0,5105.0,4887.0,4610.0,4172.0,3505.0,2578.0,1373.0,-123.0,-1894.0,-3829.0,-5798.0,-7667.0,-9337.0,-10800.0,-12073.0,-13167.0,-14086.0,-14771.0,-15127.0,-15035.0,-14443.0,-13406.0,-12168.0,-10937.0,-9846.0,-8848.0,-7855.0,-6815.0,-5700.0,-4532.0,-3349.0,-2175.0,-1033.0,47.0,1038.0,1931.0,2731.0,3469.0,4177.0,4844.0,5434.0,5952.0,6371.0,6709.0,6992.0,7268.0,7564.0,7843.0,8049.0,8098.0,7926.0,7548.0,7008.0,6375.0,5709.0,5019.0,4300.0,3538.0,2722.0,1840.0,883.0,-158.0])
X2 = np.array([-827.0,-1612.0,-2321.0,-2917.0,-3366.0,-3633.0,-3687.0,-3508.0,-3104.0,-2526.0,-1842.0,-1105.0,-350.0,428.0,1242.0,2091.0,2962.0,3817.0,4570.0,5247.0,5836.0,6344.0,6783.0,7168.0,7518.0,7875.0,8284.0,8769.0,9339.0,9960.0,10586.0,11192.0,11762.0,12302.0,12820.0,13311.0,13766.0,14171.0,14507.0,14742.0,14845.0,14780.0,14520.0,14055.0,13379.0,12494.0,11424.0,10274.0,9163.0,8195.0,7438.0,6883.0,6506.0,6279.0,6145.0,5944.0,5500.0,4676.0,3345.0,1747.0,120.0,-1368.0,-2612.0,-3685.0,-4691.0,-5688.0,-6714.0,-7757.0,-8799.0,-9825.0,-10818.0,-11756.0,-12618.0,-13388.0,-14048.0,-14571.0,-14914.0,-15039.0,-14932.0,-14530.0,-13848.0,-12955.0,-11931.0,-10886.0,-9916.0,-9046.0,-8279.0,-7590.0,-6951.0,-6347.0,-5758.0,-5172.0,-4582.0,-3984.0,-3375.0,-2748.0,-2095.0,-1407.0,-671.0,124.0])
X3 = np.array([846.0,1719.0,2591.0,3438.0,4235.0,4958.0,5584.0,6098.0,6489.0,6767.0,6937.0,6992.0,6917.0,6680.0,6251.0,5625.0,4819.0,3907.0,2922.0,1960.0,1063.0,247.0,-485.0,-1157.0,-1811.0,-2552.0,-3474.0,-4583.0,-5843.0,-7145.0,-8379.0,-9511.0,-10528.0,-11452.0,-12302.0,-13065.0,-13723.0,-14258.0,-14660.0,-14919.0,-15023.0,-14945.0,-14617.0,-13998.0,-13059.0,-11771.0,-10136.0,-8263.0,-6289.0,-4364.0,-2616.0,-1068.0,282.0,1442.0,2425.0,3279.0,4053.0,4784.0,5465.0,6170.0,6869.0,7516.0,8064.0,8523.0,8931.0,9321.0,9726.0,10167.0,10654.0,11189.0,11767.0,12369.0,12973.0,13549.0,14064.0,14477.0,14748.0,14861.0,14798.0,14544.0,14091.0,13475.0,12752.0,12024.0,11376.0,10809.0,10289.0,9741.0,9095.0,8349.0,7526.0,6664.0,5801.0,4943.0,4090.0,3238.0,2386.0,1537.0,697.0,-124.0])
X4 = np.array([-808.0,-1614.0,-2419.0,-3228.0,-4053.0,-4909.0,-5814.0,-6776.0,-7813.0,-8872.0,-9898.0,-10843.0,-11670.0,-12370.0,-12932.0,-13327.0,-13512.0,-13462.0,-13246.0,-12871.0,-12404.0,-11904.0,-11409.0,-10919.0,-10405.0,-9772.0,-8928.0,-7864.0,-6609.0,-5274.0,-3969.0,-2737.0,-1591.0,-507.0,540.0,1536.0,2458.0,3261.0,3912.0,4427.0,4832.0,5165.0,5491.0,5838.0,6233.0,6710.0,7307.0,8046.0,8915.0,9865.0,10828.0,11766.0,12659.0,13487.0,14218.0,14751.0,14986.0,14857.0,14360.0,13650.0,12893.0,12190.0,11592.0,11042.0,10478.0,9874.0,9225.0,8564.0,7931.0,7353.0,6852.0,6444.0,6135.0,5904.0,5711.0,5477.0,5125.0,4615.0,3898.0,3024.0,2023.0,940.0,-172.0,-1250.0,-2237.0,-3103.0,-3818.0,-4358.0,-4697.0,-4848.0,-4828.0,-4676.0,-4432.0,-4103.0,-3682.0,-3160.0,-2524.0,-1765.0,-874.0,157.0])

V1 = np.array([2281.0,2410.0,2554.0,2707.0,2860.0,3007.0,3131.0,3212.0,3179.0,3106.0,2989.0,2818.0,2523.0,1993.0,1241.0,510.0,27.0,339.0,541.0,699.0,842.0,953.0,1024.0,1122.0,1265.0,1477.0,1632.0,1687.0,1676.0,1625.0,1560.0,1498.0,1450.0,1419.0,1402.0,1381.0,1352.0,1284.0,1223.0,1419.0,2136.0,3054.0,3339.0,3368.0,3339.0,3291.0,3233.0,3177.0,3128.0,3081.0,3049.0,3024.0,3011.0,3002.0,2976.0,2668.0,1512.0,318.0,1476.0,2184.0,2559.0,2768.0,2907.0,3034.0,3140.0,3216.0,3260.0,3287.0,3292.0,3292.0,3289.0,3281.0,3270.0,3264.0,3288.0,3351.0,3335.0,3034.0,2446.0,1940.0,1415.0,1042.0,825.0,814.0,947.0,1007.0,863.0,234.0,822.0,1622.0,2049.0,2229.0,2289.0,2329.0,2365.0,2413.0,2456.0,2498.0,2529.0,2551.0])
V2 = np.array([2275.0,2123.0,1912.0,1621.0,1243.0,755.0,156.0,520.0,1174.0,1716.0,2155.0,2548.0,2935.0,3265.0,3356.0,3183.0,2904.0,2682.0,2381.0,2255.0,2147.0,2060.0,1998.0,1921.0,1793.0,1603.0,1451.0,1406.0,1430.0,1484.0,1550.0,1604.0,1636.0,1651.0,1651.0,1649.0,1658.0,1694.0,1734.0,1529.0,794.0,453.0,1302.0,1689.0,1873.0,1947.0,1954.0,1888.0,1765.0,1596.0,1382.0,1147.0,892.0,623.0,434.0,783.0,1886.0,2850.0,3319.0,3365.0,3364.0,3346.0,3315.0,3262.0,3181.0,3083.0,3000.0,2935.0,2899.0,2877.0,2859.0,2850.0,2845.0,2814.0,2712.0,2375.0,1616.0,569.0,444.0,1505.0,2303.0,2754.0,2987.0,3080.0,3104.0,3141.0,3215.0,3288.0,3056.0,2591.0,2235.0,2063.0,2028.0,2018.0,2004.0,1986.0,1966.0,1948.0,1945.0,1949.0])
V3 = np.array([2327.0,2361.0,2351.0,2304.0,2206.0,2045.0,1803.0,1494.0,1136.0,825.0,535.0,190.0,292.0,995.0,1769.0,2347.0,2688.0,2861.0,3114.0,3204.0,3269.0,3310.0,3332.0,3352.0,3350.0,3326.0,3271.0,3215.0,3162.0,3112.0,3055.0,2997.0,2920.0,2826.0,2709.0,2563.0,2397.0,2238.0,2075.0,1685.0,802.0,544.0,1642.0,2249.0,2602.0,2834.0,2985.0,3075.0,3136.0,3173.0,3191.0,3199.0,3194.0,3183.0,3183.0,3326.0,3287.0,2529.0,1698.0,1485.0,1445.0,1455.0,1460.0,1395.0,1290.0,1206.0,1184.0,1241.0,1355.0,1500.0,1664.0,1829.0,1993.0,2105.0,2117.0,1876.0,1276.0,514.0,261.0,951.0,1530.0,1900.0,2109.0,2146.0,2074.0,2047.0,2180.0,2615.0,3089.0,3201.0,3123.0,3035.0,2966.0,2895.0,2806.0,2698.0,2565.0,2404.0,2220.0,2012.0])
V4 = np.array([2223.0,2180.0,2171.0,2201.0,2284.0,2421.0,2607.0,2796.0,3013.0,3144.0,3232.0,3267.0,3215.0,2938.0,2317.0,1481.0,617.0,157.0,683.0,1249.0,1702.0,2028.0,2253.0,2444.0,2633.0,2841.0,2994.0,3084.0,3149.0,3191.0,3231.0,3262.0,3290.0,3315.0,3336.0,3346.0,3359.0,3359.0,3360.0,3351.0,3123.0,2322.0,1632.0,1261.0,1095.0,1049.0,1090.0,1213.0,1380.0,1566.0,1758.0,1939.0,2112.0,2272.0,2367.0,2076.0,998.0,446.0,1239.0,1495.0,1565.0,1581.0,1594.0,1672.0,1783.0,1868.0,1898.0,1860.0,1761.0,1621.0,1443.0,1240.0,1020.0,844.0,793.0,1063.0,1658.0,2320.0,2972.0,3273.0,3380.0,3340.0,3243.0,3178.0,3159.0,3127.0,2997.0,2577.0,1621.0,648.0,76.0,535.0,839.0,1110.0,1385.0,1653.0,1914.0,2150.0,2355.0,2527.0])

time = np.array([0.36,0.73,1.1,1.47,1.83,2.18,2.53,2.87,3.21,3.55,3.87,4.16,4.42,4.66,4.9,5.17,5.47,5.79,6.11,6.41,6.68,6.93,7.15,7.35,7.55,7.77,8.05,8.39,8.79,9.21,9.61,9.99,10.34,10.67,10.98,11.28,11.55,11.79,11.98,12.13,12.26,12.4,12.6,12.88,13.24,13.69,14.24,14.85,15.48,16.09,16.64,17.12,17.54,17.9,18.21,18.47,18.71,19.0,19.4,19.87,20.35,20.79,21.17,21.5,21.82,22.14,22.48,22.84,23.2,23.56,23.91,24.24,24.54,24.81,25.05,25.27,25.48,25.7,25.94,26.21,26.51,26.83,27.17,27.51,27.82,28.1,28.34,28.55,28.76,28.99,29.25,29.53,29.82,30.12,30.42,30.74,31.07,31.42,31.8,32.21])


X = [X1,X2,X3,X4]
V = [V1,V2,V3,V4]

n = 1
tf = 30
t = np.linspace(0,tf,X[n-1].shape[0])
t1 = np.linspace(0,tf,100)

for n in range(1,5):

    fx = interp1d(t, np.array(X[n-1]), kind = 'cubic')
    cX = X[n-1]#fx(t1)

    fv= interp1d(t, np.array(V[n-1]), kind = 'cubic')
    cV = V[n-1]#fv(t1)
    plt.subplot(2,2,n)

    # plt.plot(t,V[n-1],"x", label = "th v"+str(n))
    # plt.plot(t,X[n-1],"o", label = "th pos")

    plt.plot(data[:,0],abs(data[:,n+4]), label = "exp v")
    plt.plot(data[:,0],data[:,n], label = "exp pos")
    
    plt.plot(time,cX,"--", label = "th pos")
    plt.plot(time,cV,"--", label = "th vit")
    plt.title("moteur " +str(n))
    
    plt.legend()
plt.show()


